package com.fhz.day005.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.fhz.day005.R;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link DownFragment1#newInstance} factory method to
 * create an instance of this fragment.
 */
public class DownFragment1 extends Fragment implements UpFragment.MyListener{

    private TextView downTv;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_down1, container, false);

        downTv = (TextView) inflate.findViewById(R.id.down_tv1);

        return inflate;
    }

    @Override
    public void click(String s) {
        downTv.setText(s);
    }
}